#########################################################
#Figure 2: Wealth Increases Leave Support
#########################################################

data <- read.dta13("./temp/fig2data.dta")
data <- data[2:3,]

data$type <- c(0,1)
ggplot(data, aes(as.factor(type), coef)) + 
  geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7, color= "gray40") +
  geom_hline(yintercept = 0, color="red", lwd=1.2) + 
  theme_nice() + ylab("Effect on Leave Support") + xlab("Wealth Type") + 
  theme(axis.title = element_text(size=14),
        axis.text = element_text(size=12),
        panel.grid.minor = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.major.x = element_line(linetype="solid")) + 
  scale_x_discrete(labels=c("Financial", "Property"))   + 
  scale_y_continuous(breaks=c(-.05, -0.02, 0, 0.02, 0.05) , limits=c(-.05,.08)) + coord_flip() 
ggsave("./figures/fig2.pdf")
rm(data)